package mysql

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	OrderSn    string  `gorm:"type:char(36);not null;"`
	GoodsId    int     `gorm:"type:int;not null;"`
	UserId     int     `gorm:"type:int;not null;"`
	Amount     float64 `gorm:"type:decimal(10,2);not null;"`
	PayType    int     `gorm:"type:int;not null;"`
	Status     int     `gorm:"type:int;not null;"`
	GoodsTitle string  `gorm:"type:varchar(30);not null;"`
}

func (o *Order) Create() error {
	return DB.Debug().Create(&o).Error
}
func (o *Order) FindOrder() {

}
